﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="Plane.aspx.cs" Inherits="Admin_Plane" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 670px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<tr>
<td style="text-align: center" class="style1"> Danh sách máy bay</td>
<td style="text-align: center"> 
    <asp:Button ID="btnAddPlane" runat="server" Text="Add New" 
        onclick="btnAddPlane_Click" />
    </td>
</tr>
 <tr>
 <td class="style1">
 <asp:Label ID="Label1" runat="server"></asp:Label>
 </td>
 
 

 <td>
     &nbsp;</td>
 
 

 </tr>
 <tr>
            <td colspan="2">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    Width="820px">
                    <Columns>
                        <asp:BoundField DataField="planeID" HeaderText="Mã Máy Bay" />
                        <asp:BoundField DataField="planeSymbol" HeaderText="Mã Hiệu MB" />
                        <asp:BoundField DataField="planeName" HeaderText="Người mua" />
                        <asp:BoundField DataField="planeSeat" HeaderText="Số Ghế" />
                        <asp:BoundField DataField="planeInfo" HeaderText="Thông Tin MB" />
                        <asp:TemplateField HeaderText="Thao tác">
                            <ItemTemplate>
                                <table >
                                    <tr>
                                        <td>
                                            <asp:LinkButton ID="lbEdit" runat="server" 
                                                CommandArgument='<%# Eval("planeID","{0}") %>' onclick="lbEdit_Click" 
                                                CommandName="Select">Sửa</asp:LinkButton>
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="lbDelete" runat="server" 
                                                CommandArgument='<%# Eval("planeID","{0}") %>' onclick="lbDelete_Click" 
                                                CommandName="Select" onclientclick="return confirm('Are you sure?');">Xóa</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
</table>
</asp:Content>

